package com.hm.PushCaseService.config.mq;

import org.apache.activemq.command.ActiveMQTopic;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;


@Configuration
public class ActiveMQTopicConfig {
    private static final Logger logger = LoggerFactory.getLogger(ActiveMQTopicConfig.class);

    @Primary
    @Bean(name = {"ActiveMQTopic_case"})
    public ActiveMQTopic caseInfoTopic() {
        logger.warn("=======>主题：ActiveMQTopic_case初始化了<=======");
        return new ActiveMQTopic("caseInfoTopic");
    }

    @Bean(name = {"ActiveMQTopic_log"})
    public ActiveMQTopic logInfoTopic() {
        logger.warn("=======>主题：ActiveMQTopic_log初始化了<=======");
        return new ActiveMQTopic("logInfoTopic");
    }

}
